package com.zmn.oms.third.youshu.dto;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.*;

import java.util.List;

/**
 * 类描述：腾讯有数汇总订单上报数据
 *
 * @author ligang
 * @since 2022/3/22 16:23
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
public class YouShuSumOrderDTO extends YouShuRequest{

    /**
     * 数据源Id
     */
    private String dataSourceId;

    /**
     * 订单列表 数组最大长度 50
     */
    private List<YouShuSumOrderDTO.Order> orders;

    /**
     * 订单信息
     */
    @Data
    @NoArgsConstructor
    @Builder
    @AllArgsConstructor
    public static class Order {

        /**
         * 日期，unix时间戳，字段长度为13字节
         */
        @JSONField(name = "ref_date")
        private String refDate;

        /**
         * 该日期下单金额之和
         */
        @JSONField(name = "give_order_amount_sum")
        private Float giveOrderAmountSum;
        /**
         * 该日期下单数量之和
         */
        @JSONField(name = "give_order_num_sum")
        private Integer giveOrderNumSum;

        /**
         * 该日期的支付金额之和
         */
        @JSONField(name = "payment_amount_sum")
        private Float paymentAmountSum;

        /**
         * 该日期的支付数量之和
         */
        @JSONField(name = "payed_num_sum")
        private Integer payedNumSum;
    }
}
